package com.smart.community.region.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 单元数据传输对象
 * 
 * @author Wu.Liang
 * @since 2024-12-21
 */
@Data
@Schema(description = "单元信息DTO")
public class UnitDTO {

    @Schema(description = "单元ID")
    private Long id;

    @Schema(description = "单元编码", required = true)
    @NotBlank(message = "单元编码不能为空")
    @Size(max = 50, message = "单元编码长度不能超过50个字符")
    private String unitCode;

    @Schema(description = "单元名称", required = true)
    @NotBlank(message = "单元名称不能为空")
    @Size(max = 100, message = "单元名称长度不能超过100个字符")
    private String unitName;

    @Schema(description = "所属楼栋ID", required = true)
    @NotNull(message = "所属楼栋ID不能为空")
    private Long buildingId;

    @Schema(description = "所属社区ID", required = true)
    @NotNull(message = "所属社区ID不能为空")
    private Long communityId;

    @Schema(description = "楼层数")
    private Integer floorCount;

    @Schema(description = "房间数量")
    private Integer roomCount;

    @Schema(description = "房户数量")
    private Integer householdCount;

    @Schema(description = "建筑面积（平方米）")
    private Double area;

    @Schema(description = "是否有电梯：0-无，1-有")
    private Integer hasElevator;

    @Schema(description = "电梯数量")
    private Integer elevatorCount;

    @Schema(description = "门禁类型：1-密码，2-刷卡，3-人脸识别，4-指纹")
    private Integer doorAccessType;

    @Schema(description = "门禁密码")
    @Size(max = 20, message = "门禁密码长度不能超过20个字符")
    private String accessCode;

    @Schema(description = "单元管理员ID")
    private Long managerId;

    @Schema(description = "管理员姓名")
    @Size(max = 50, message = "管理员姓名长度不能超过50个字符")
    private String managerName;

    @Schema(description = "配套设施（JSON格式）")
    @Size(max = 500, message = "配套设施长度不能超过500个字符")
    private String facilities;

    @Schema(description = "状态：0-禁用，1-启用")
    private Integer status;

    @Schema(description = "排序字段")
    private Integer sortOrder;

    @Schema(description = "备注")
    @Size(max = 500, message = "备注长度不能超过500个字符")
    private String remark;

    @Schema(description = "创建人ID")
    private Long createBy;

    @Schema(description = "更新人ID")
    private Long updateBy;
} 